package com.example.base.validation.annation;


import com.example.base.validation.component.NonEmptyArrayValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Constraint(validatedBy = {NonEmptyArrayValidator.class})
public @interface NonEmptyArray {

    /**
     * 是否需要校验
     * @return  boolean
     */
    boolean required() default true;

    String message() default "list 不得为空";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

}
